import axios from '../../network/axios'

// 店铺销售查询
export function getVipSellList(params) {
  return axios({
    method: 'get',
    url: '/vip-sell-total/getVipSell',
    params
  })
}

// 查询vip信息
export function getVipList(params) {
  return axios({
    method: 'get',
    url: '/vip-customer/list',
    params
  })
}

// 业绩销售查询
export function getCommissionList(params) {
  return axios({
    url: '/vip-commission/list',
    params
  })
}

// 删除VIP销售记录
export function deleteSell(data) {
  return axios({
    method: 'post',
    url: '/vip-sell-total/deleteSell',
    data
  })
}

// 查询VIP职员（营业员） 点击查询按钮的时候
export const getPersonnelList = (params) => {
  return axios({
    method: 'GET',
    url: '/vip-personnel/list',
    params
  })
}

// 获取品牌对象
export function getBranded(params = {}) {
  return axios({
    url: '/branded/list',
    params
  })
}

//继续录入
export function keepPostShop(data) {
  return axios({
    method: 'post',
    url: '/vip-sell-total/insert',
    data
  })
}

// 编辑店铺销售记录
export function updateVipSell(data) {
  return axios({
    method: 'put',
    url: '/vip-sell-total/updateVipSell',
    data
  })
}

// 确认入单
export function saveAffirm(params) {
  return axios({
    method: 'put',
    url: '/vip-sell-total/affirm',
    params
  })
}

// 付款方式查询api
export const getPayMethods = () => {
  return axios({
    method: 'GET',
    url: '/vip-payment/list'
  })
}

// 获取积分/积分兑换数据（结账时调用）
export function getVipIntegral(params) {
  return axios({
    method: 'get',
    url: '/vip-sell-total/getVipIntegral',
    params
  })
}

// 获取积分/积分兑换数据（结账时调用）
export function updateStatus(data) {
  return axios({
    method: 'post',
    url: '/vip-sell-total/updateStatus',
    data
  })
}

// 获取营业员提成比例
export function getListBySequence(params) {
  return axios({
    method: 'get',
    url: '/vip-commission/getListBySequence',
    params
  })
}

// 密码验证

export const verifyPassword = (params) => {
  return axios({
    method: 'GET',
    url: '/vip-customer/checkPass',
    params
  })
}
